package com.example.modelfunction.test.configureTest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

public class DeveloperControl {
    @Autowired
    private Developer developer;


    @RequestMapping(value = "/developer",method = RequestMethod.GET)
    public String showDeveloper(HttpServletRequest request){
        request.getSession().setAttribute("developer",developer.toString());
        System.out.println("【函数通知】/developer");
        return developer.toString();
    }
    @RequestMapping(value ="/getDeveloper",method = RequestMethod.GET)
    public Developer getDeveloper(){

        return developer;
    }
}
